package com.vteApp;

import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;

public class UserRegistrationActivity extends VTEAppActivity implements
		OnClickListener {

	@Override
	protected void onStart() {
		super.onStart();
		setContentView(R.layout.userregistration);

		ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
				this, R.array.user_types, android.R.layout.simple_spinner_item);
		adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		Spinner spinner = (Spinner) findViewById(R.id.spinner1);
		spinner.setAdapter(adapter);

		Button b = (Button) findViewById(R.id.button_next);
		b.setOnClickListener(this);
		b = (Button) findViewById(R.id.button_back);
		b.setOnClickListener(this);

	}

	@Override
	public void onClick(View v) {
		Intent intent;
		if (v.getId() == R.id.button_next)
			intent = new Intent().setClass(this, MainActivity.class);
		else
			intent = new Intent().setClass(this,
					PatientRegistrationActivity.class);
		startActivity(intent);

	}
}
